<?php

namespace Apps\AppApi\Method\Order;


use Apps\AppApi\Method\BaseMethod;
use Apps\Common\Libs\Pay;

class WeiXinPay extends BaseMethod
{
    public function run()
    {
        /**
         * 验证用户权限
         */
        if(false == $this->verifyUserAuth()){
            return false;
        }
        $id = intval($this->getDataItem('order_id', 0));
        $pay = new Pay();
        $payInfo = $pay->weiXin2AppPay($id);
        $this->setResult($payInfo ? $payInfo : null);
    }
}